<template>
    <div :style="'height:' + height">
        <iframe :src="src" frameborder="no" style="width: 100%; height: 100%" scrolling="auto" />
    </div>
</template>
<script lang="ts" setup>
import { onMounted,getCurrentInstance } from 'vue';
const { proxy }: any = getCurrentInstance();//关键代码
const props = defineProps({
    src: { type: String, default: '' }
})
 
let height = document.documentElement.clientHeight - 94.5 + "px;";
onMounted(() => {
    console.log('props.src==========>',props.src)
    
    proxy.$modal.loading(); 
    setTimeout(() => {
        proxy.$modal.closeLoading();
    }, 3000);  

    window.onresize = function temp() {
        height = document.documentElement.clientHeight - 94.5 + "px;";
    };
})
</script>
  